package com.lgy.springcloud.controller;

import com.lgy.springcloud.entity.Dept;
import com.lgy.springcloud.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeptController {
    @Autowired
    DeptService deptService;

    @GetMapping("/list")
    public List<Dept> list(){
        return deptService.list();
    }

}
